From 2d66d8efcf293a2dcf2c0ef08e3ac49a8ec9d53b Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Fri, 15 Jun 2007 09:25:09 -0600 Subject: [PATCH] [IA64] Create NVRAM save directory If you use RPM to install XEN, the directory(/usr/lib/xen/boot) will be removed when you un-install the RPM. This patch create that directory before NVRAM file creating. Signed-off-by: Zhang Xin --- tools/libxc/ia64/xc_ia64_hvm_build.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/libxc/ia64/xc_ia64_hvm_build.c b/tools/libxc/ia64/xc_ia64_hvm_build.c index a3872f2aec..228becc3e8 100644 --- a/tools/libxc/ia64/xc_ia64_hvm_build.c +++ b/tools/libxc/ia64/xc_ia64_hvm_build.c @@ -735,6 +735,7 @@ int xc_ia64_save_to_nvram(int xc_handle, uint32_t dom) return 0; } +#define NVRAM_DIR "/usr/lib/xen/boot/" #define NVRAM_FILE_PATH "/usr/lib/xen/boot/nvram_" int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom) { @@ -749,6 +750,7 @@ int xc_ia64_nvram_init(int xc_handle, char *dom_name, uint32_t dom) return -1; } strcpy(nvram_path + file_path_len, dom_name); + mkdir(NVRAM_DIR, 0765); nvram_fd = nvram_init(nvram_path); if ( nvram_fd == (uint64_t)(-1) ) -- 2.30.2